package com.dzx.design.structural.proxy.db;

/**
 * @author dzx
 * @ClassName:
 * @Description:
 * @date 2019年08月09日 09:58:05
 */
public class DataSourceContextHolder {
    private static final ThreadLocal<String> CONTEXT_HOLDER = new ThreadLocal<String>();

    public static void setDBType(String dbType) {
        CONTEXT_HOLDER.set(dbType);
    }

    public static String getDBType() {
        return CONTEXT_HOLDER.get();
    }
    public static void clearDBType(){
          CONTEXT_HOLDER.remove();
    }
}
